package cn.lin.controller;

import cn.lin.domain.Quick;
import cn.lin.service.QuickService;
import cn.lin.util.Result;
import cn.lin.vo.QuickVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zxy
 * @date 2024/12/6 18:46
 */
@RestController
@RequestMapping("quick")
public class QuickController {
    @Autowired
    private QuickService quickService ;
    @PostMapping("/sec")
    public Object sec(@RequestBody Quick quick){
        Quick quick1 = quickService.findID(quick.getQuickName()) ;
        quick.setId(quick1.getId());
        quick = quickService.quick(quick);
        return Result.ok("抢答结果",quick);
    }
}
